<?php

/**
 * @copyright Copyright(c) 2016\
 * @brief 商家系统菜单管理
 * @author nswe
 * @date 2016/7/23
 * @version 1.0
 */

namespace Partner\Model;

use Think\Plugin;

class menu {

    //菜单的配制数据
    public static $menu = array
        (
        "统计模块" => array(
            "Index/index" => "管理首页",
        ),
        "二维码管理" => array(
            "Code/code_list" => "二维码列表",
            //"Code/code_edit" => "生成二维码",
            'Code/export' => '导出Excel'
        ),
        "商品模块" => array(
            "Goods/goods_list" => "商品列表",
            "Goods/goods_edit" => "添加商品"
        ),
        '商品分类' => array(
            'Goods/category_list' => '分类列表',
            'Goods/category_edit' => '添加分类'
        ),
        '商品品牌' => array(
            'Goods/brand_category' => '品牌分类',
            'Goods/brand_list' => '品牌列表'
        ),
        '商品模型' => array(
            'Goods/model_list' => '模型列表',
            'Goods/spec_list' => '规格列表'
        ),
        '优惠券' => array(
            'Game/coupon_list' => '优惠券管理',
            'Game/coupon_edit' => '新建优惠券'
        ),
        '促销活动' => array(
           // 'Partner/Game/game_list/type/1' => '幸运大转盘',
            'Partner/Game/game_list/type/2' => '好运翻翻看',
            'Partner/Game/game_list/type/3' => '微信红包'
        ),
        '文章管理' => array(
            'Article/article_cat_list' => '文章分类',
            'Article/article_list' => '文章列表'
        ),
        "配置模块" => array(
            'Set/info' => '企业信息',
            'Set/index' => '网站配置',
            'Set/config' => '微信管理',
            'Set/menu' => '菜单管理'
        ),
    );

    /**
     * @brief 根据权限初始化菜单
     * @param int $roleId 角色ID
     * @return array 菜单数组
     */
    public static function init($roleId = "") {
        //菜单创建事件触发
        plugin::trigger("onSellerMenuCreate");
        return self::$menu;
    }

}